import java.util.ArrayList;
import java.util.Scanner;

public class TestDemo3 {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        list.add(1);
    }
    public static void main2(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String str = in.nextLine();
            String emailMatcher = "[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z0-9]+";
            if (str.matches(emailMatcher)) {
                System.out.println("邮箱格式合法");
            } else {
                System.out.println("邮箱格式不合法");
            }
        }
    }
    public static void main1(String[] args) {
        String s = "123";
        int a = Integer.valueOf(s);
        Integer a1 = Integer.valueOf(2);    //显示的转包
        Integer a3 = new Integer("123");   //显示的装包
        System.out.println(a3);

        int b2 = a1.intValue();
        double d = a3.doubleValue();
    }
}
